import { Comment, List, Tooltip } from 'antd';
import React from 'react';

const data = [
  {
    actions: [<span key="comment-list-reply-to-0">有效，点个赞</span>],
    author: '张小剑',
    avatar: 'https://joeschmoe.io/api/v1/random',
    content: (
      <p>
       骨折后，术后护理也非常重要，除了减少活动，卧床外，患者还需要保持骨折部位的卫生，避免引发感染，从而加重病情。
      </p>
    ),
    datetime: (
      <Tooltip title="2016-11-22 10:22:33">
        <span>9 hours ago</span>
      </Tooltip>
    ),
  },
];

export default () => (
  <List
    className="comment-list"
    header={`${data.length} replies`}
    itemLayout="horizontal"
    dataSource={data}
    renderItem={item => (
      <li>
        <Comment
          actions={item.actions}
          author={item.author}
          avatar={item.avatar}
          content={item.content}
          datetime={item.datetime}
        />
      </li>
    )}
  />
);